{include file="public/header"}
<body>
	<div class="sectionY">
		<a href="javascript:history.back();">
			<img src="__PUBLIC__/home/images/a19.png" alt="" class="a1">
		</a>
		<p class="p1">提现明细</p>
	</div>
	<div class="kong1" style=""></div>
	<div class="ti_section1 clearfix">
		<div class="container">
			<ul class="clearfix">
				<li class="select" data-type="0">
					<a href="javascript:;">所有</a>
				</li>
				<li data-type="1">
					<a href="javascript:;">待审核</a>
				</li>
				<li data-type="2">
					<a href="javascript:;">待打款</a>
				</li>
				<li data-type="3">
					<a href="javascript:;">已打款</a>
				</li>
				<li data-type="4">
					<a href="javascript:;">无效</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="ti_section2">
		<div class="t1 ulData" style="display: block;">
		</div>
		<div style="line-height: 25px; text-align: center; color: #868686;" onclick="loadData()" class="more">
			<span style="width: 100%;">--点击查看更多--</span>
		</div>
	</div>
	
</body>
<script type="text/javascript">
	$(function(){
		$(".ti_section1 li").click(function(){
			$(this).addClass("select").siblings().removeClass("select");
			var dd = $(this).index();
			var type = $(this).data("type");
			query.type=type;
			query.page=1;
			is_end=false;
			loadData();
		})
		loadData();
	})
	var query={
		page:1,
		page_num:20,
		type:0
	},is_end=false;
	//加载数据
	function loadData() {
		if(is_end){
			return;
		}
		let index = modal.loading();
		$.post("{:url('withdrawLog')}", query, function (res) {
			if(query.page==1){
				$(".ulData").html("");
			}
			query.page++;
			modal.close(index);
			modal.msg(res.result_info);
			let data = res.result_data;
			// console.log(data);
			// return;
			if(res.result_code==0){
				let _li = '';
				$.each(data, function (i,v) {
					_li += '\t\t\t<div class="f1 clearfix">\n' +
							'\t\t\t\t<div class="left">\n' +
							'\t\t\t\t\t<span class="s1">'+v.bank_name+'('+v.bank_num+')'+'</span>\n' +
							'\t\t\t\t\t<p class="p1">'+v.create_time+'</p>\n' +
							'\t\t\t\t</div>\n';
					if(v.status == 0){
						_li += '\t\t\t\t<span class="s4">待审核</span>\n';
					}
					if(v.status == 1){
						_li += '\t\t\t\t<span class="s4">待打款</span>\n';
					}
					if(v.status == 2){
						_li += '\t\t\t\t<span class="s4">已打款</span>\n';
					}
					if(v.status == 3){
						_li += '\t\t\t\t<span class="s4">无效</span>\n';
					}
							_li += '\t\t\t\t<span class="s3">-'+v.money+'</span>\n' +
							'\t\t\t</div>';
				})
				$(".ulData").append(_li);
			}
			if(data.length<query.page_num){
				$(".more").find("span").text("--我是有底线的--");
				is_end=true;
			}
		});
	}
</script>
</html>